# find_package(BLAS REQUIRED)
add_executable(my_reduce_v0_shared_memory my_reduce_v0_shared_memory.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v0_shared_memory PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v0_shared_memory PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

add_executable(my_reduce_v1_no_wrap_divergence my_reduce_v1_no_wrap_divergence.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v1_no_wrap_divergence PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v1_no_wrap_divergence PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

add_executable(my_reduce_v2_no_block_conflict my_reduce_v2_no_block_conflict.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v2_no_block_conflict PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v2_no_block_conflict PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()


add_executable(my_reduce_v3_add_during_load_plan_a my_reduce_v3_add_during_load_plan_a.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v3_add_during_load_plan_a PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v3_add_during_load_plan_a PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

add_executable(my_reduce_v3_add_during_load_plan_b my_reduce_v3_add_during_load_plan_b.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v3_add_during_load_plan_b PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v3_add_during_load_plan_b PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

add_executable(my_reduce_v4_unroll_last_warp my_reduce_v4_unroll_last_warp.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v4_unroll_last_warp PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v4_unroll_last_warp PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

add_executable(my_reduce_v5_shuffle my_reduce_v5_shuffle.cu)
# target link libraries(my reduce ve global memory PRIVATE CUDA::cudart ${CUDA cUblaS LIBRARY} ${BLAS LIBRARIES})
target_link_libraries(my_reduce_v5_shuffle PRIVATE CUDA::cudart ${CUDA_cublas_LIBRARY})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(my_reduce_v5_shuffle PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()